package com.springboot.service.Annotations.impl;

import com.springboot.mapper.Annotations.AnnotationsMapper;
import com.springboot.pojo.Annotations;
import com.springboot.service.Annotations.AnnotationsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnnotationsServiceImpl implements AnnotationsService {

    private AnnotationsMapper annotationsMapper;

    @Autowired
    public AnnotationsServiceImpl(AnnotationsMapper annotationsMapper) {
        this.annotationsMapper = annotationsMapper;
    }

    @Override
    public List<Annotations> getAllAnnotations() {
        return annotationsMapper.getAllAnnotations();
    }

    @Override
    public Annotations getAnnotationById(Long annotationId) {
        return (Annotations) annotationsMapper.getAnnotationById(annotationId);
    }

    @Override
    public void addAnnotation(Annotations annotation) {

    }


    @Override
    public void updateAnnotation(Annotations annotation) {
        annotationsMapper.updateAnnotation((AnnotationsMapper) annotation);
    }

    @Override
    public void deleteAnnotation(Long annotationId) {
        annotationsMapper.deleteAnnotation(annotationId);
    }
}